﻿using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Lian
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_deng_Click(object sender, EventArgs e)
        {
            TBUserBLL userBLL = new TBUserBLL();
            //var a = userBLL.insert(txt_xing.Text, txt_mi.Text);
            var a = userBLL.tiao(txt_xing.Text, txt_mi.Text);
            if (a != null)
            {
                ClientScript.RegisterStartupScript(GetType(), "loginerror", "alert('登陆成功')", true);
                Response.Redirect("WebForm4");
            }
            //if (a)
            //{
            //    ClientScript.RegisterStartupScript(GetType(), "loginerror", "alert('登陆成功')", true);


            //}
            ClientScript.RegisterStartupScript(GetType(), "loginerror", "alert('登陆失败')", true);
        }
    }
}